package com.dragon.mmochat.model.enumType;

//称谓列表:不可减少或修改
public enum MmochatChenHaoType {
	// 守护神称谓
	余杭守护神(1), 南郊守护神(2), 死海守护神(3), 天山守护神(4), 东海守护神(5), 岐山守护神(6), 灵山守护神(7), 妖谷守护神(
			8), 天外守护神(9), 九幽守护神(10), 地狱一层守护神(11), 地狱二层守护神(12), 地狱三层守护神(13), 地狱四层守护神(
			14), 地狱五层守护神(15), 地狱六层守护神(16), 地狱七层守护神(17), 地狱八层守护神(18), 地狱九层守护神(19), 地狱十层守护神(
			20),

	// 帮派称谓
	帮主(100), 副帮主(101), 精英(102), 帮众(103),

	// 比赛称号
	试道王者(120), 出类拔萃(121), 天下第一(122),

	// 排行榜称谓
	顶尖高手(130), 道行高深(131), 战绩达人(132), 腰缠万贯(133),

	// 夫妻称谓
	娘子(140), 相公(141),

	// 师徒
	徒弟(150),

	蜀山最强(160), 拜月最强(161), 昆仑最强(162),

	// 转生称号
	一转灵仙(170), 二转天仙(171), 三转真仙(172), 四转玄仙(173), 五转金仙(174), 六转圣人(175), 七转玄圣(176), 八转金圣(
			177), 九转神圣(178),

	一转狂魔(180), 二转天魔(181), 三转真魔(182), 四转玄魔(183), 五转金魔(184), 六转魔尊(185), 七转魔圣(186), 八转魔王(
			187), 九转魔神(188),

	镇妖护法(200),

	区服称号(210),

	结拜称号(220),

	跨服王者(230), 跨服高手(231), 跨服新贵(232),

	擂台新贵(240), 擂台高手(241), 擂台狂人(242), 擂台小神(243), 擂台武神(244), 擂台战神(245);

	int key;

	MmochatChenHaoType(int key) {
		this.key = key;
	}

	public int getKey() {
		return key;
	}

	public static MmochatChenHaoType get(int v) {
		for (MmochatChenHaoType type : MmochatChenHaoType.values()) {
			if (type.getKey() == v) {
				return type;
			}
		}
		return null;
	}

	// 获取所有地图守护神称谓
	public static MmochatChenHaoType[] getMapGuiderChenhaoList() {
		return new MmochatChenHaoType[] { MmochatChenHaoType.余杭守护神,
				MmochatChenHaoType.南郊守护神, MmochatChenHaoType.死海守护神,
				MmochatChenHaoType.天山守护神, MmochatChenHaoType.东海守护神,
				MmochatChenHaoType.岐山守护神, MmochatChenHaoType.灵山守护神,
				MmochatChenHaoType.妖谷守护神, MmochatChenHaoType.天外守护神,
				MmochatChenHaoType.九幽守护神, MmochatChenHaoType.地狱一层守护神,
				MmochatChenHaoType.地狱二层守护神, MmochatChenHaoType.地狱三层守护神,
				MmochatChenHaoType.地狱四层守护神, MmochatChenHaoType.地狱五层守护神,
				MmochatChenHaoType.地狱六层守护神, MmochatChenHaoType.地狱七层守护神,
				MmochatChenHaoType.地狱八层守护神, MmochatChenHaoType.地狱九层守护神,
				MmochatChenHaoType.地狱十层守护神 };
	}

	// 获取所有帮派称谓
	public static MmochatChenHaoType[] getGangChenhaoList() {
		return new MmochatChenHaoType[] { MmochatChenHaoType.帮主,
				MmochatChenHaoType.副帮主, MmochatChenHaoType.精英,
				MmochatChenHaoType.帮众 };
	}

	// 获取所有门派最强称谓
	public static MmochatChenHaoType[] getFamilyChenhaoList() {
		return new MmochatChenHaoType[] { MmochatChenHaoType.蜀山最强,
				MmochatChenHaoType.拜月最强, MmochatChenHaoType.昆仑最强 };
	}

	// 获得所有转生称号
	public static MmochatChenHaoType[] getRebornChenhaoList() {
		return new MmochatChenHaoType[] { MmochatChenHaoType.一转灵仙,
				MmochatChenHaoType.二转天仙, MmochatChenHaoType.三转真仙,
				MmochatChenHaoType.四转玄仙, MmochatChenHaoType.五转金仙,
				MmochatChenHaoType.六转圣人, MmochatChenHaoType.七转玄圣,
				MmochatChenHaoType.八转金圣, MmochatChenHaoType.九转神圣,

				MmochatChenHaoType.一转狂魔, MmochatChenHaoType.二转天魔,
				MmochatChenHaoType.三转真魔, MmochatChenHaoType.四转玄魔,
				MmochatChenHaoType.五转金魔, MmochatChenHaoType.六转魔尊,
				MmochatChenHaoType.七转魔圣, MmochatChenHaoType.八转魔王,
				MmochatChenHaoType.九转魔神 };
	}

	// 根据转生次数获得称号
	public static MmochatChenHaoType getChenhaoByReborn(int rebornTimes,
			MmochatSecondRoleType secondRoleType) {
		if (secondRoleType.getValue() == MmochatSecondRoleType.魔道.getValue()) {
			switch (rebornTimes) {
			case 1:
				return MmochatChenHaoType.一转狂魔;
			case 2:
				return MmochatChenHaoType.二转天魔;
			case 3:
				return MmochatChenHaoType.三转真魔;
			case 4:
				return MmochatChenHaoType.四转玄魔;
			case 5:
				return MmochatChenHaoType.五转金魔;
			case 6:
				return MmochatChenHaoType.六转魔尊;
			case 7:
				return MmochatChenHaoType.七转魔圣;
			case 8:
				return MmochatChenHaoType.八转魔王;
			case 9:
				return MmochatChenHaoType.九转魔神;
			default:
				return null;
			}
		} else {
			switch (rebornTimes) {
			case 1:
				return MmochatChenHaoType.一转灵仙;
			case 2:
				return MmochatChenHaoType.二转天仙;
			case 3:
				return MmochatChenHaoType.三转真仙;
			case 4:
				return MmochatChenHaoType.四转玄仙;
			case 5:
				return MmochatChenHaoType.五转金仙;
			case 6:
				return MmochatChenHaoType.六转圣人;
			case 7:
				return MmochatChenHaoType.七转玄圣;
			case 8:
				return MmochatChenHaoType.八转金圣;
			case 9:
				return MmochatChenHaoType.九转神圣;
			default:
				return null;
			}
		}
	}
}
